<%DIRECTIVE DYNAMIC;%>
<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal" aria-label="Close">
		<span aria-hidden="true">&times;</span>
	</button>
	<h5 class="modal-title" >修改</h5>
</div>

            <form id="eidtForm" role="form" class="form-horizontal parsley-form" data-parsley-validate
                  action="${base}/platform/allot/editDo" method="post">
                  <div class="modal-body ">
               	<input type="hidden" name="id" value="${obj.agreement.id!}">
               	<input type="hidden" name="company_id" value="${obj.agreement.company_id!}">
               	<input type="hidden" name="school_id" value="${obj.agreement.school_id!}">
               	<input type="hidden" name="product_type" value="${obj.agreement.product_type!}">
               	<input type="hidden" name="createAt" value="${obj.account.createAt!}">
               	<input type="hidden" name="createBy" value="${obj.account.createBy!}">
                <div class="row mb10">
                    <div class="col-lg-12">
                   	 	<div class="form-group">
                            <label class="col-sm-2 control-label">主体</label>
                            <div class="col-sm-8">
                                <input type="text"  class="form-control"  value="${obj.companyName!}" readonly="readonly">
                            </div>
                        </div>
                   	 	<div class="form-group">
                            <label class="col-sm-2 control-label">驾校</label>
                            <div class="col-sm-8">
                                <input type="text"  class="form-control"  value="${obj.schoolName!}" readonly="readonly">
                            </div>
                        </div>
                   	 	<div class="form-group">
                            <label class="col-sm-2 control-label">产品</label>
                            <div class="col-sm-8">
                                <input type="text"  class="form-control"  value="${obj.productTypeName!}" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="company_ratio" class="col-sm-2 control-label">主体比例</label>

                            <div class="col-sm-8">
                                <input type="text" id="company_ratio" class="form-control" name="company_ratio" data-parsley-required="true" placeholder="主体比例" value="${obj.agreement.company_ratio}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="school_ratio" class="col-sm-2 control-label">驾校比例</label>

                            <div class="col-sm-8">
                                <input type="text" id="school_ratio" class="form-control" name="school_ratio" data-parsley-required="true" placeholder="驾校比例"  value="${obj.agreement.school_ratio}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="trainer_ratio" class="col-sm-2 control-label">培训者比例</label>

                            <div class="col-sm-8">
                                <input type="text" id="trainer_ratio" class="form-control" name="trainer_ratio" data-parsley-required="true" placeholder="培训者比例"  value="${obj.agreement.trainer_ratio}">
                            </div>
                        </div>
                        
                    </div>
                </div>
                </div>
	<div class="modal-footer">
		<button  class="btn btn-default btn-sm btn-parsley"  >完成</button> 
	</div>
            </form>

<script language="JavaScript">
$(document).ready(function () {
	var dialog=$("#editModal");
	$("#editModalDialog").draggable();
    $('#eidtForm').ajaxForm({
        dataType: 'json',
        beforeSubmit: function (arr, form, options) {
        },
        success: function (data, statusText, xhr, form) {
            if (data.code == 0) {
                Toast.success(data.msg);
                datatable.ajax.reload();
               	dialog.modal("hide");
            } else {
                Toast.error(data.msg);
                datatable.ajax.reload();
             	dialog.modal("hide");
            }
        }
    });
});
</script>
